function daysBetweenDates(d) {
  const now = new Date()
  const date = new Date(d)

  const diffTime = Math.abs(now - date)

  const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24))

  return diffDays
}

export { daysBetweenDates }
